package com.seckill.redis;

public class MiaoshaKey extends BasePrefix {

    private MiaoshaKey(String prefix) {
        super(prefix);
    }

    private MiaoshaKey(int expireSeconds, String prefix) {
        super(expireSeconds, prefix);
    }

    /**
     * 秒杀失败的结果
     */
    public static MiaoshaKey isGoodsOver = new MiaoshaKey("goodsOver");

    public static MiaoshaKey miaoshaPath = new MiaoshaKey(60,"mp");

    public static MiaoshaKey getMiaoshaVerifyCode = new MiaoshaKey(60,"vc");

    public static String getMiaoshaKey(long goodsId,long userId){
        return goodsId+"-"+userId;
    }

}
